package com.car.dal.dao.daikuan;

import java.util.List;

import com.car.bean.GridObj;
import com.car.bean.OrderObj;
import com.car.bean.PageObj;
import com.car.dal.dao.ibatis.IbatisCommonDao;
import com.car.dal.object.TgDaikuan;
import com.car.util.Page;

public class DaiKuanDaoImpl extends IbatisCommonDao<TgDaikuan, Long> implements DaikuanDao {

	public GridObj GetList(TgDaikuan daikuan, PageObj pageObj) {
		OrderObj order = new OrderObj();
		order.setDir("desc");
		order.setSort("create_time");
		// TODO Auto-generated method stub
		return super.findByPage(daikuan, pageObj, order);
	}
	
	public Integer getDaikuanCountByType(TgDaikuan daikuan) {
		return this.queryForInteger("getDaikuanCountByType", daikuan);
	}
	
	public List<TgDaikuan> getDaiKuanByType(TgDaikuan daikuan,Page page) {
		daikuan.setFirstrownum(page.getFirstrownum());
		daikuan.setPagesize(page.getPagesize());
		return this.queryForEntityList(TgDaikuan.class,"getDaiKuanByType", daikuan);
	}
	
	public List<TgDaikuan> getDaiKuanByType2(TgDaikuan daikuan) {
		return this.queryForEntityList(TgDaikuan.class,"getDaiKuanByType2", daikuan);
	}
	
}
